<div class="topControls flex">
  <%
    // This is something found at the top of multiple modals. Would be nice to make this into a template
    // and componentize the css.
  %>
  <% if (ob.returnText) { %>
  <div class="btnStrip clrSh3">
    <a class="btn clrP clrBr clrT js-returnBox">
      <span class="ion-chevron-left margRSm"></span>
      <%= ob.returnText %>
    </a>
  </div>
  <% } %>
</div>

<div class="flex gutterH">
  <div class="tabColumn gutterV">
    <div class="contentBox clrP clrBr clrSh3 tx4 featuredProfile js-featuredProfile <% if (ob.isFetching || ob.fetchFailed) print('disabled') %>"></div>
    <div class="contentBox padMd clrP clrBr clrSh3 <% if (ob.isFetching || ob.fetchFailed) print('disabled') %>">
      <h1 class="h4 txUp clrT"><%= ob.polyT('tabMenuHeading') %></h1>
      <div class="boxList tx4 clrTx1Br tabHeads">
        <a class="js-tab tab clrT row" data-tab="summary"><%= ob.polyT('orderDetail.navMenu.summary') %></a>
        <a class="js-tab tab row" data-tab="discussion">
          <span><%= ob.polyT('orderDetail.navMenu.discussion') %><span class="unreadBadge js-unreadChatMessagesBadge discSm clrE1 clrBrEmph1 clrTOnEmph"><%= ob.getUnreadChatMessagesText() %></span></span>
        </a>
        <a class="js-tab tab row" data-tab="contract"><%= ob.polyT('orderDetail.navMenu.contract') %></a>
      </div>
    </div>
    <div class="mainCtaWrap hide <% if (ob.isFetching || ob.fetchFailed) print('hide') %>">
      <%= ob.processingButton({
        className: `btn clrBAttGrad clrBrDec1 clrTOnEmph`,
        btnText: 'Accept Order',
      }) %>
    </div>
    <div class="js-actionBarContainer"></div>
  </div>
  <div class="flexExpand posR">
    <div class="contentBox clrP clrBr clrSh3 mainContent">
      <% if (ob.isFetching) { %>
        <div class="center"><%= ob.spinner({ className: 'spinnerMd' }) %></div>
      <% } else if (ob.fetchFailed) { %>
        <div class="center txCtr tx4">
          <div class="txB <% print(ob.initialFetchErrorMessage ? 'rowTn' : 'row') %>">Unable to fetch order.</div>
          <% if (ob.fetchError) { %>
            <div class="row"><%= ob.fetchError %></div>
          <% } %>
          <a class="btn clrP clrBr clrSh2 js-retryFetch">Retry</a>
        </div>
      <% } else { %>
        <section class="tabContent js-tabContent">
          <!-- insert the tab subview here -->
        </section>
      <% } %>
    </div>
  </div>
</div>